//
//  ZYCategorySearchCollectionViewCell.m
//  Adorable_Things
//
//  Created by huzhiyan on 16/1/18.
//  Copyright © 2016年 Banana Inc. All rights reserved.
//

#import "ZYCategorySearchCollectionViewCell.h"

@implementation ZYCategorySearchCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _nameLbel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        _nameLbel.font = [UIFont systemFontOfSize:12];
        _nameLbel.textAlignment = NSTextAlignmentCenter;
        _nameLbel.layer.cornerRadius = 15;
        [self.contentView addSubview:_nameLbel];
    }
    return self;
}

- (void)itemColorSelected:(BOOL)selected
{
    if (selected) {
        _nameLbel.layer.borderWidth = 1;
        _nameLbel.layer.borderColor = [[UIColor redColor] CGColor];
        _nameLbel.textColor = [UIColor redColor];
    } else {
        _nameLbel.layer.borderWidth = 1;
        _nameLbel.layer.borderColor = [[UIColor grayColor] CGColor];
        _nameLbel.textColor = [UIColor grayColor];
    }
}

@end
